package com.hm.cms.api;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.hm.cms.auto.su.ControllerResult;
import com.hm.cms.auto.su.R;
import com.hm.cms.service.VisitIpStatisticsService;
import com.hm.common.su.bean.ServerResponse;

import io.swagger.annotations.ApiOperation;

/**
 * @author shishun.wang
 * @date 2018年1月17日 上午11:04:45
 * @version 1.0
 * @describe
 */
@ResponseBody
@RestController
@RequestMapping(R.Restful.API + "/rafficStatisticsReports")
public class StatisticsReportsApi {

	private static final String SWWAGER_TAG = "数据访问统计报表";

	@Autowired
	private VisitIpStatisticsService visitIpStatisticsService;

	@RequestMapping(value = "/webPageTrafficStatisticsReports", method = RequestMethod.GET)
	@ApiOperation(tags = SWWAGER_TAG, value = "获取网站网页访问量", httpMethod = "GET", notes = "获取网站网页访问量")
	public ResponseEntity<ServerResponse<Map<String, Object>>> webPageTrafficStatisticsReports() {
		return ControllerResult.success(visitIpStatisticsService.webPageTrafficStatisticsReports());
	}
}
